package BusinessLogic;
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.Clip;

public class Sound {

    public void play(String file){
        try {
            Clip clip = AudioSystem.getClip();
            AudioInputStream inputStream = AudioSystem.getAudioInputStream(
            getClass().getResource("/Sound/"+file+".wav"));
            clip.open(inputStream);
            clip.start(); 
        }
        catch (Exception e) {
        }
    }
}
